package org.client.iot.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import org.client.iot.domain.DataInfo;
import org.client.iot.domain.DataList;
import org.client.iot.domain.HoleDto;

import org.client.iot.dao.DataInfoDao;
import org.client.iot.dao.DataListDao;
import org.client.iot.dao.HoleDtoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig dataInfoDaoConfig;
    private final DaoConfig dataListDaoConfig;
    private final DaoConfig holeDtoDaoConfig;

    private final DataInfoDao dataInfoDao;
    private final DataListDao dataListDao;
    private final HoleDtoDao holeDtoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        dataInfoDaoConfig = daoConfigMap.get(DataInfoDao.class).clone();
        dataInfoDaoConfig.initIdentityScope(type);

        dataListDaoConfig = daoConfigMap.get(DataListDao.class).clone();
        dataListDaoConfig.initIdentityScope(type);

        holeDtoDaoConfig = daoConfigMap.get(HoleDtoDao.class).clone();
        holeDtoDaoConfig.initIdentityScope(type);

        dataInfoDao = new DataInfoDao(dataInfoDaoConfig, this);
        dataListDao = new DataListDao(dataListDaoConfig, this);
        holeDtoDao = new HoleDtoDao(holeDtoDaoConfig, this);

        registerDao(DataInfo.class, dataInfoDao);
        registerDao(DataList.class, dataListDao);
        registerDao(HoleDto.class, holeDtoDao);
    }
    
    public void clear() {
        dataInfoDaoConfig.clearIdentityScope();
        dataListDaoConfig.clearIdentityScope();
        holeDtoDaoConfig.clearIdentityScope();
    }

    public DataInfoDao getDataInfoDao() {
        return dataInfoDao;
    }

    public DataListDao getDataListDao() {
        return dataListDao;
    }

    public HoleDtoDao getHoleDtoDao() {
        return holeDtoDao;
    }

}
